// cover some element-ui styles
@import './variables.scss';
@import './element-variables.scss';

.el-breadcrumb__inner,
.el-breadcrumb__inner a {
  font-weight: 400 !important;
}

.el-upload {
  input[type="file"] {
    display: none !important;
  }
}

.el-upload__input {
  display: none;
}

.cell {
  .el-tag {
    margin-right: 0px;
  }
}

.small-padding {
  .cell {
    padding-left: 5px;
    padding-right: 5px;
  }
}

.fixed-width {
  .el-button--mini {
    padding: 7px 10px;
    width: 60px;
  }
}

.status-col {
  .cell {
    padding: 0 10px;
    text-align: center;

    .el-tag {
      margin-right: 0px;
    }
  }
}

// to fixed https://github.com/ElemeFE/element/issues/2461
.el-dialog {
  transform: none;
  left: 0;
  position: relative;
  margin: 0 auto;
}

// refine element ui upload
.upload-container {
  .el-upload {
    width: 100%;

    .el-upload-dragger {
      width: 100%;
      height: 200px;
    }
  }
}

// dropdown
.el-dropdown-menu {
  a {
    display: block
  }
}

// fix date-picker ui bug in filter-item
.el-range-editor.el-input__inner {
  display: inline-flex !important;
}

// to fix el-date-picker css style
.el-range-separator {
  box-sizing: content-box;
}

.el-menu--collapse
  > div
  > .el-submenu
  > .el-submenu__title
  .el-submenu__icon-arrow {
  display: none;
}

.el-message.create-success {
  background: #fff;
  min-width: 212px;

  .message-create-title {
    color: #3B92E3;
    margin: 0px 30px;
    font-weight: 700;
    font-size: 16px;
    line-height: 32px;
  }
}

.el-tiptap-editor > .el-tiptap-editor__content {
  border: 1px solid #ebeef5;
}

.el-descriptions-item__content {
  color: #333;
}

.el-table {
  .el-table__cell {
    font-size: 14px;
    color: #333;
    font-weight: 400;
    opacity: 1;
  }

  .el-table__header thead .el-table__cell {
    color: rgba(51, 51, 51, .5);
  }

  .table-head {
    opacity: .5;
  }

  .table-tr .el-table__cell {
    background: #F7F7F7;
    //color: #012656;
    font-size: 15px;
    font-weight: 450;
  }
}

.el-button {
  &.is-disabled {
    opacity: .5;
  }

  &.el-button--danger {
    border: none;
    color: $--button-danger !important;
    background: $--button-danger-background !important;

    &:hover {
      border: none;
      color: $--button-danger !important;
      background: $--button-danger-hover !important;
    }

    &:active {
      border: none;
      color: $--button-danger !important;
      background: $--button-danger-active !important;
    }

    &.is-disabled {
      color: $--button-danger !important;
      //border: 1px solid $--border-color-light;
      background: $--button-danger-disable !important;
    }
  }


  &.el-button--primary {
    color: $--button-primary !important;
    background: $--button-primary-background !important;
    border: none;

    &:hover {
      border: none;
      color: $--button-primary !important;
      background: $--button-primary-hover !important;
    }

    &:active {
      border: none;
      color: $--button-primary !important;
      background: $--button-primary-active;
    }

    &.is-disabled {
      color: $--button-primary !important;
      border: 1px solid $--border-color-light;
      background: $--button-primary-disable !important;
    }
  }

  &.el-button--default {
    color: $--button-default !important;
    background: $--button-default-background !important;
    border: none;

    &:hover {
      border: none;
      color: $--button-default !important;
      background: $--button-default-hover !important;
    }

    &:active {
      border: none;
      color: $--button-default !important;
      background: $--button-default-active !important;
    }

    &.is-disabled {
      color: $--button-default !important;
      border: 1px solid $--border-color-light;
      background: $--button-default-disable !important;
    }
  }

  &.el-button--info {
    color: $--button-info !important;
    background: $--button-info-background !important;
    border: 1px solid $--border-color-base;

    &:hover {
      border: none;
      color: $--button-info !important;
      background: $--button-info-hover !important;
    }

    &:active {
      color: $--button-info !important;
      background: $--button-info-active !important;
      border: 1px solid $--border-color-lighter;
    }

    &.is-disabled {
      color: $--button-info !important;
      border: 1px solid $--border-color-light;
      background: $--button-info-disable !important;
    }
  }

  &.el-button--success {
    color: $--button-success !important;
    background: $--button-success-background !important;
    border: none;

    &:hover {
      border: none;
      color: $--button-success !important;
      background: $--button-success-hover !important;
    }

    &:active {
      border: none;
      color: $--button-success !important;
      background: $--button-success-active !important;
    }

    &.is-disabled {
      color: $--button-success !important;
      border: 1px solid $--border-color-light;
      background: $--button-success-disable !important;
    }
  }

  &.el-button--warning {
    color: $--button-warning !important;
    background: $--button-warning-background !important;
    border: none;

    &:hover {
      border: none;
      color: $--button-warning !important;
      background: $--button-warning-hover !important;
    }

    &:active {
      border: none;
      color: $--button-warning !important;
      background: $--button-warning-active !important;
    }

    &.is-disabled {
      color: $--button-warning !important;
      border: 1px solid $--border-color-light;
      background: $--button-warning-disable !important;
    }
  }

  &.el-button--text {
    color: $--button-text;
    //background: $--button-text-background-color;
    padding-left: 0;
    border-color: transparent;
    padding-right: 0;

    &:hover {
      color: $--button-text-hover;
      //background: $--button-text-background-color;
      border: none;
    }

    &:active {
      color: $--button-text-active;
      //background: $--button-text-background-color;
      border: none;
    }
  }

}
